Added gpsbabel startup-time (freezed and unfreezed) to global variables.
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 19 Dec 2005 22:11:52 +0000 (22:11 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 19 Dec 2005 22:11:52 +0000 (22:11 +0000)
gpsbabel/defs.h
gpsbabel/globals.c
gpsbabel/main.c

index 9bea4dfcc4bca7417af0969a36df9d9752e781e8..2e4fa2e5a96aa8b3812e1596a8180e1f6d0a34b9 100644 (file)
@@ -120,6 +120,8 @@ typedef struct {
 
 extern global_options global_opts;
 extern const char gpsbabel_version[];
+extern time_t gpsbabel_now;    /* gpsbabel startup-time; initialized in main.c with time() */
+extern time_t gpsbabel_time;   /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */
 
 /* Short or Long XML Times */
 #define XML_SHORT_TIME 1
index efbb789fa271ef3fb6d52d5cd80507724f7f05a7..72e343d3a66760802a0b2a94696d2f4527eca91c 100644 (file)
@@ -24,5 +24,6 @@
 
 global_options global_opts;
 const char gpsbabel_version[] = VERSION;
-
+time_t gpsbabel_now;   /* gpsbabel startup-time; initialized in main.c with time() */
+time_t gpsbabel_time;  /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */
 
index c0e79533fddb78aad6915db01fe1bc36d1e4e8a3..a95b0d05641cdcd459f923437fae3b2eda4626a3 100644 (file)
@@ -103,6 +103,9 @@ main(int argc, char *argv[])
        global_opts.charset = NULL;                     /* #ifdef UTF8_SUPPORT */
        global_opts.charset_name = NULL;                        /* #ifdef UTF8_SUPPORT */
 
+       gpsbabel_now = time(NULL);                      /* gpsbabel startup-time */
+       gpsbabel_time = current_time();                 /* same like gpsbabel_now, but freezed to zero during testo */
+       
 #ifdef DEBUG_MEM
        debug_mem_open();
        debug_mem_output( "command line: " );